Conventionally, in an image forming apparatus, a sheet size in an option setting for a print job, irrespective of a sheet size detected by a sensor, can be freely set by a user. Therefore, in the case that the sheet size which is detected by the sensor differs from a sheet size which is set by the user, and when the job is executed, the image forming apparatus in which an error occurs displays a warning for urging a user to confirm the sheet size. At this moment, the user needs to confirm a sheet which is arranged in a paper feed cassette or the set sheet size.